//
//  DateTimeSelectView.h
//  MClient
//
//  Created by  史正烨 on 10-9-7.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MCViewController;
@class MCDatePicker;
@class MCControl;
@interface DateTimeSelectView : UIView {
	MCDatePicker *datePicker;
	UIToolbar* toolBar;
	MCControl*  textFieldView;
	MCViewController* parentViewController;
	BOOL      isShown;
	UIBarButtonItem *titleBtn;
	NSMutableDictionary *fieldData;
}

@property(nonatomic, assign)MCControl* textFieldView;
@property(nonatomic, assign)BOOL     isShown;
@property(nonatomic, retain)NSMutableDictionary *fieldData;

+ (DateTimeSelectView *)instance;

- (void)show:(MCViewController*)parentController withMode:(UIDatePickerMode)mode;
- (void)selectCancelAction;
@end


typedef enum {
	MCDatePickerModeDate,
	MCDatePickerModeDateTime
}MCDatePickerMode;

@interface MCDatePicker : UIView<UIPickerViewDataSource, UIPickerViewDelegate>
{
	UIPickerView  *_picker;
	NSDate        *_date;
	MCDatePickerMode _mode;
	int           _localYear;
	int           _curMonth;
}

@property(nonatomic, retain)NSDate*            date;
@property(nonatomic, assign)MCDatePickerMode   mode;

@end
